<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../../tpl/head.jsp"%>
<link rel="stylesheet" href="statics/css/secondarytitle.css">
<link rel="stylesheet" href="statics/css/ExportBusiness/tpl/newupshipmentdetails.css">
<div class="layui-fluid">
    <div class="layui-card">
        <div class="header">
            <img class="img " src="statics/images/titheader.svg">
            <span>增加清关</span>
            <input id="billId" hidden>
        </div>
        <input hidden id="signingcompanyCode">
        <input hidden id="custCode">
        <input hidden id="opCode">
        <input hidden id="salesmanCode">
        <input hidden id="customerLevelName">
        <input hidden id="customerLevelCode">
        <div class="layui-card-body">
            <form class="layui-form" action="" lay-filter="editor-form" id="editor-form">
                <%--                start--%>
                <dl class="layui-row sk_row">
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>客户名称</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text"  style="background-color: lightgray" name="customername" id="customername" readonly="readonly"  autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            发票日期
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="idate"  autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            出运日期
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="shdate"  autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            预计收汇日期
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="edrdate"  autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>清关发票号码</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="invoicenumber" autocomplete="off" class="layui-input" lay-verify="required" onblur="checkBillNo()"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>币种</text>
                        </div>
                        <div class="layui-col-xs8">  <input type="text"  style="background-color: lightgray" name="currency" lay-verify="required" autocomplete="off" class="layui-input" readonly="readonly"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>美元汇率</text>
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="exchangerate" style="background-color: lightgray" readonly="readonly" autocomplete="off" class="layui-input" lay-verify="required|number"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>人民币汇率</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="rmbexchangerate" style="background-color: lightgray" readonly="readonly" autocomplete="off" class="layui-input" lay-verify="required|number"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            起运地
                        </div>
                        <div class="layui-col-xs8"> <select lay-search name="place" id="place" lay-filter="place">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            目的地
                        </div>
                        <div class="layui-col-xs8"> <select lay-search name="destination" id="destination" lay-filter="destination">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>收款(清关)方式</text>
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="settlementway" id="settlementway" lay-filter="settlementway">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            价格术语
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="priceterms" id="priceterms" lay-filter="priceterms">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            发票总额
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="invoicetotalamount" style="background-color: lightgray" readonly="readonly" autocomplete="off" class="layui-input" lay-verify="number"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            销售合同号
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="salescontractno" style="background-color: lightgray" readonly="readonly" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            客户合同号
                        </div>
                        <div class="layui-col-xs8"> <input class="layui-input" type="text"  style="background-color: lightgray" readonly="readonly" name="customercontractno" autocomplete="off"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            业务员
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="salesman" autocomplete="off" style="background-color: lightgray"  class="layui-input" lay-verify="required" readonly="readonly"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>业务模式</text>
                        </div>
                        <div class="layui-col-xs8">  <input type="text" name="businessmodel" autocomplete="off" style="background-color: lightgray"  class="layui-input" lay-verify="required" readonly="readonly"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            As Per IN No
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="asperinno" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            仓库
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="warehouse" autocomplete="off"  class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            逾期
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="withinlimit" autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            账期
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="containertype" autocomplete="off" class="layui-input" ></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text>签约公司</text>
                        </div>
                        <div class="layui-col-xs8">  <select lay-search name="signingcompany" id="signingcompany" lay-filter="required">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            银行
                        </div>
                        <div class="layui-col-xs8"><select lay-search name="bank" id="bank" lay-filter="bank" disabled="disabled">
                            <option value=""></option>
                        </select></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            操作员
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="theoperator" readonly="readonly"  autocomplete="off" class="layui-input"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text class="text-red">进仓装柜日期</text>
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="wldate" id="wldate"  autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            <text class="text-red">实际开船日期ATD</text>
                        </div>
                        <div class="layui-col-xs8"> <input type="text" name="actualdischargedateatd" id="actualdischargedateatd"  autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            关税总金额
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="totaltariffamount" id="tars" autocomplete="off" class="layui-input" lay-verify="number"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            制单日期
                        </div>
                        <div class="layui-col-xs8"><input type="text" name="createdate" lay-verify="required|date" autocomplete="off" class="layui-input starttime" placeholder="年 - 月 - 日"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            是否走信保订单
                        </div>
                        <div class="layui-col-xs8"><input type="text" id="clear_1" autocomplete="off" style="background-color: lightgray"  class="layui-input"  readonly="readonly"></div>
                    </dd>
                    <dd class="layui-col-md3">
                        <div class="layui-col-xs4 text-right padding-right">
                            信保订单金额USD
                        </div>
                        <div class="layui-col-xs8"><input type="text" id="clear_2" autocomplete="off" style="background-color: lightgray"  class="layui-input"  readonly="readonly"></div>
                    </dd>
                </dl>
                <%--                over--%>

                <div class="layui-row">
                    <div class="layui-col-xs12">
                        <div class="layui-tab layui-tab-card">
                            <ul class="layui-tab-title">
                                <li class="layui-this">产品</li>
                                <li class="">费用</li>
                                <li class="">附件</li>
                                <li class="">日志</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div  class="layui-tab-item  layui-show">
                                    <table class="layui-table" id="storageproducts" lay-filter="storageproductstable"></table>

                                    <div class="layui-tab layui-tab-card" id="hidden">
                                        <ul class="layui-tab-title">
                                            <li class="layui-this">产品规格配件</li>
                                        </ul>
                                        <div class="layui-tab-content">
                                            <div class="layui-tab-item layui-show">
                                                <table class="layui-table" id="productsaselect" lay-filter="productsatable"></table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="cost" lay-filter="costtable"></table>
                                </div>
                                <div class="layui-tab-item">
                                    <table class="layui-table" id="attachment" lay-filter="attachmenttable"></table>
                                </div>
                                <div class="layui-tab-item"><table class="layui-table" id="otherwarehouselog" lay-filter="logtable"></table></div>
                            </div>
                        </div>
                    </div>
                </div>
                <div class="padding text-right">
                    <button type="button" class="layui-btn" lay-submit="" lay-filter="form-element">立即提交</button>
                </div>
            </form>
        </div>
    </div>
</div>

<div class="layui-upload" id="attachmentupload" style="display: none;padding: 10px">
    <a type="button" class="layui-btn layui-btn-normal" id="uploadfile">选择文件</a>
    <div class="layui-upload-list">
        <table class="layui-table">
            <thead>
            <tr><th>文件名</th>
                <th>大小</th>
                <th>状态</th>
                <th>操作</th>
            </tr></thead>
            <tbody id="uploadlist"></tbody>
        </table>
    </div>
    <a type="button" class="layui-btn" id="testListAction">开始上传</a>
</div>

<script type="text/html" id="productcodeselect">
    <div class="layui-input-inline">
        <div class="layui-form-select ySearchSelect y_{{d.id}}" data-id="{{d.id}}">
            <div class="layui-input">{{d.productcode==undefined?"":d.productcode}}</div>
            <i class="layui-edge"></i>
            <table class="layui-table zdy" id="productcodeselect_{{d.id}}" lay-filter="productcodeselecttable_{{d.id}}"></table>
        </div>
    </div>
</script>

<script type="text/html" id="grossweightselect">
    <select name="grossweightselect" lay-filter="grossweightselect_filter">
        <option value="{{d.grossweight}}">{{d.grossweight==undefined?"":d.grossweight}}</option>
        <option value="text1">text1</option>
        <option value="text2">text2</option>
    </select>
</script>

<script type="text/html" id="unitselect">
    <select name="unitselect" lay-filter="unitselect_filter">
        <option value="{{d.unit}}">{{d.unit==undefined?"":d.unit}}</option>
        <option value="text1">text1</option>
        <option value="text2">text2</option>
    </select>
</script>

<script type="text/html" id="costtypeselect">

<%--    <select id="costType" name="dictName" lay-filter="dictName" data-value="{{d.name}}">--%>
<%--     --%>
<%--    </select>--%>

 <select id="costType" class="costType" name="costtypeselect" lay-filter="costtypeselect_filter">
<%--     {{#  if(d.costType){ }}--%>
<%--     <a href="/detail/{{d.id}}" class="layui-table-link">{{d.title}}</a>--%>
<%--     {{#  } else { }}--%>
<%--     {{d.title}}(普通用户)--%>
<%--     {{#  } }}--%>
<%--         <option value="{{d.costType}}" >{{d.costType==undefined?"":d.costType}}</option>--%>
   </select>
</script>

<script type="text/html" id="costtoolbar">
    <a class="layui-btn layui-btn-normal" lay-event="new">增加费用</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
    <span> 说明:（金额>0 为增加费用；金额<0 为扣减费用）</span>
</script>

<script type="text/html" id="storageproductstoolbar">
    <a class="layui-btn"  id="daoru" lay-event="importshipmentdetailsjh">导入出运明细</a>
    <a class="layui-btn layui-btn-danger" lay-event="del">删除</a>
</script>
<script type="text/html" id="storageproductseditor">
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="attachmenttoolbar">
    <a class="layui-btn" data-type="getCheckData" lay-event="uploadfile">上传</a>
</script>
<script type="text/html" id="attachmenteditor">
    <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="download">下载</a>
    <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>

<script type="text/html" id="productsaup">
    <a class="layui-btn layui-btn-xs layui-btn-danger" lay-event="productsade">删除</a>
</script>
<script type="text/html" id="productsatoolbar">

</script>
<%@ include file="../../tpl/foot.jsp"%>
<script src="statics/js/ExportBusiness/tpl/billClearSet.js"></script>